import 'package:flutter/material.dart';

class DDSubTitle extends StatelessWidget {
  final String title;
  final IconData icon;
  final Color fontColor;
  final Color backgroundColor;
  DDSubTitle(
    this.title, {
    this.icon = Icons.arrow_downward,
    this.fontColor = Colors.blue,
    this.backgroundColor = Colors.white,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.fromLTRB(0.0, 10.0, 10.0, 10.0),
      decoration: BoxDecoration(color: backgroundColor),
      child: Row(
        children: <Widget>[
          Icon(
            icon,
            size: 20.0,
            color: fontColor,
          ),
          Text(
            title,
            style: TextStyle(
              color: fontColor,
              fontWeight: FontWeight.bold,
            ),
          ),
        ],
      ),
    );
  }
}
